#ifndef __ACCEPTOR__
#define __ACCEPTOR__
#include"inetAddr.h"
#include"Socket.h"

class Acceptor{
public:
    Acceptor(const string&addr,unsigned short&port);
    ~Acceptor();
    void ready();//封装bind listen set..
    int accept();//封装accept 返回值是netfd
    int fd(); //得到netfd
private:
    void bind();
    void listen();
    void setRuaddr();
    void setRuport();
private:
    inetAddr _addr;
    Socket _socket;  //这里的还是sockfd
};

#endif